Skip to content

mv,cp: fix xattr TOCTOU by using file descriptor-based operations#10545

Open
sylvestre wants to merge 1 commit intouutils:mainfrom
sylvestre:issue-10014
Open

mv,cp: fix xattr TOCTOU by using file descriptor-based operations#10545
sylvestre wants to merge 1 commit intouutils:mainfrom
sylvestre:issue-10014

Conversation

@sylvestre
Copy link
Copy Markdown
Contributor

Closes: #10014

@uutils uutils deleted a comment from github-actions Bot Jan 28, 2026
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
Note: The gnu test tests/cp/sparse-2 is now being skipped but was previously passing.

@sylvestre sylvestre force-pushed the issue-10014 branch 2 times, most recently from 6dda6b4 to 3f06bad Compare February 21, 2026 21:03
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Feb 21, 2026

Merging this PR will not alter performance

✅ 303 untouched benchmarks
⏩ 46 skipped benchmarks1


Comparing sylvestre:issue-10014 (be02dd9) with main (6e18efb)

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/date/date-locale-hour. tests/date/date-locale-hour is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/date/date-locale-hour. tests/date/date-locale-hour is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/date/resolution. tests/date/resolution is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/date/resolution. tests/date/resolution is passing on 'main'. Maybe you have to rebase?

@sylvestre sylvestre marked this pull request as ready for review February 26, 2026 20:36
@sylvestre sylvestre force-pushed the issue-10014 branch 2 times, most recently from cf75720 to 1514ccd Compare March 16, 2026 21:59
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/expand/bounded-memory is now passing!

@sylvestre sylvestre force-pushed the issue-10014 branch 2 times, most recently from 35596ca to 5fa39b8 Compare March 17, 2026 10:45
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/expand/bounded-memory is now passing!

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/sparse. tests/cp/sparse is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/sparse-2. tests/cp/sparse-2 is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/sparse-extents-2. tests/cp/sparse-extents-2 is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/symlink (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/pipe-f is now passing!

@sylvestre sylvestre force-pushed the issue-10014 branch 3 times, most recently from 867b6a0 to 09664a9 Compare March 18, 2026 22:16
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/misc/io-errors. tests/misc/io-errors is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tac/tac-2-nonseekable. tests/tac/tac-2-nonseekable is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/rm/many-dir-entries-vs-OOM is now being skipped but was previously passing.
Note: The gnu test tests/unexpand/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/tail/tail-n0f is now passing!

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/expand/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/basenc/bounded-memory is now passing!
Congrats! The gnu test tests/dd/no-allocate is now passing!
Congrats! The gnu test tests/unexpand/bounded-memory is now passing!

@sylvestre sylvestre force-pushed the issue-10014 branch 3 times, most recently from 0211168 to 7f35960 Compare March 23, 2026 06:39
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/basenc/bounded-memory is now passing!
Congrats! The gnu test tests/dd/no-allocate is now passing!

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/misc/io-errors. tests/misc/io-errors is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/date/resolution (fails in this run but passes in the 'main' branch)
Note: The gnu test tests/expand/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/printf/printf-surprise is now passing!

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/misc/io-errors is no longer failing!
Congrats! The gnu test tests/cp/link-heap is now passing!
Congrats! The gnu test tests/rm/many-dir-entries-vs-OOM is now passing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mv xattr preservation TOCTOU on cross-device moves

1 participant